package part22_适配器模式.p01_类适配器模式;

/**
 * @ClassName: Phone
 * @Author: AllenSun
 * @Date: 2020/3/10 0:01
 */
public class Phone {
    public void charging(IVoltage5V iVoltage5V){
        if(iVoltage5V.output5V()==5){
            System.out.println("电压为5V，可以充电");
        }else if(iVoltage5V.output5V()>5){
            System.out.println("电压大于5V，不能充电");
        }
    }
}
